package com.liangsui.cmall.member.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.liangsui.cmall.member.exception.MobileExistException;
import com.liangsui.cmall.member.exception.UsernameExistException;
import com.liangsui.cmall.member.vo.MemberLoginVo;
import com.liangsui.cmall.member.vo.MemberOAuth2LoginAndRegisterVo;
import com.liangsui.cmall.member.vo.MemberRegisterVo;
import com.liangsui.common.utils.PageUtils;
import com.liangsui.cmall.member.entity.MemberEntity;

import java.util.Map;

/**
 * 会员
 *
 * @author zhangjiawei
 * @email 1533167396@qq.com
 * @date 2022-08-03 23:20:29
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void register(MemberRegisterVo vo);

    void checkMobileUnique(String mobile) throws MobileExistException;

    void checkUsernameUnique(String username) throws UsernameExistException;

    MemberEntity login(MemberLoginVo vo);

    MemberEntity oauthLoginAndRegister(MemberOAuth2LoginAndRegisterVo vo);

    //boolean checkEmailUnique(String email);
}

